java 8 find in list by property

64

java 8 find in list by property -

Optional<Person> matchingObject = objects.stream().
    filter(p -> p.email().equals("testemail")).
    findFirst();

Comments

Submit
0 Comments